package com.java.entity.factory;


import com.java.entity.User;
import org.springframework.beans.factory.FactoryBean;

/**
 * 使用 FactoryBean 来实现生成普通的bean
 */
public class UserFactoryBean implements FactoryBean<User> {


	/**
	 * <P>通过factoryBean 工厂获取普通的bean</P>
	 *
	 * @return
	 * @throws Exception
	 */
	@Override
	public User getObject() throws Exception {
		return new User();
	}

	/**
	 * 获取bean的类型
	 *
	 * @return
	 */
	@Override
	public Class<?> getObjectType() {
		return null;
	}
}
